package me.boot.db.mybatis.interceptor;

import com.baomidou.mybatisplus.extension.plugins.inner.DynamicTableNameInnerInterceptor;
import me.boot.db.mybatis.interceptor.tablename.DefaultTableNameHandler;
import me.boot.db.mybatis.propertites.DbProperties;

public class TableNameInterceptor extends DynamicTableNameInnerInterceptor {

    DbProperties.DynamicTable dynamicTable;
    DefaultTableNameHandler tableNameHandler;

    public TableNameInterceptor(DbProperties.DynamicTable dynamicTable) {
        this.dynamicTable = dynamicTable;
        tableNameHandler = new DefaultTableNameHandler(dynamicTable);
        setTableNameHandler(tableNameHandler);
    }
}
